<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>作业23</title>
    <script>
        /*
        用户输入一个数字，在控制台中列出它的所有约数
        */
        var num = prompt("请输入一个数字")
        var numInt = parseInt(num);

        for(var i=1; i<numInt; i++){
            if(numInt%i == 0){
                console.log(i);
            }
        }


    </script>
</head>
<body>
    
</body>
</html>